<template>
  <div class="cai">
    <span v-for="(v, i) in newarr" :key="i" @click="fun(v.id)">
      <img :src="v.biaoimg" alt="" />
      <p>{{ v.biaoqian }}</p>
    </span>
  </div>
</template>

<script>
export default {
  props: ["newarr"],
  methods: {
    fun(id) {
      console.log("我是菜单的id", id);
      // this.$router.push({ path: "/newfind/:goodid", query: { goodid: id } });
      this.$router.push({ name: "Newfind", params: { goodsid: id } });
    },
  },
};
</script>

<style scoped >
.cai {
  width: 95%;
  height: 1.8rem;
  background-color: #fff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
}
span {
  width: 25%;
  height: 40%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
span img {
  width: 0.44rem;
  height: 0.44rem;
}
span p {
  margin-top: 0.05rem;
  font-size: 0.13rem;
}
</style>